package com.sqx.modules.brand.dao;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.sqx.modules.brand.entity.Brand;
import com.sqx.modules.labelType.entity.LabelType;
import com.sqx.modules.labelType.entity.vo.LabelTypeVO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
* @author Admin
* @description 针对表【brand_type(品牌分类表)】的数据库操作Mapper
* @createDate 2024-09-14 14:35:38
* @Entity generator.domain.BrandType
*/
@Mapper
public interface BrandDao extends BaseMapper<Brand> {

    IPage<Brand> selectListByPage(Page<Brand> pages, Brand brand);

    IPage<Brand> selectListByHot(Page<Brand> pages, Brand brand);

    List<LabelTypeVO> selectListByBrandName(@Param("brandName") String brandName);

    List<Brand> selectListByIsRecovery(@Param("labelId")Long labelId,
                                       @Param("isRecovery")Integer isRecovery,
                                       @Param("isHot")Integer isHot);

    List<Brand> selectListByIsRecoveryName(@Param("labelId")Long labelId,
                                           @Param("isRecovery")Integer isRecovery,
                                           @Param("isHot")Integer isHot,
                                           @Param("brandName")String brandName);

    Integer selectCountByLabelId(@Param("brandName") String brandName,
                                 @Param("labelId") Long labelId);
}




